﻿
@{
    ViewBag.Title = "News";
}
<link href="../../Content/Styles/page.css" rel="stylesheet" type="text/css" />
<style>
    #newbox
    {
        padding: 10px;
    }
    #imagenew
    {
        
        float: left;
        margin-right: 10px;
    }
</style>
<div id="newbox">
    
    @if (ViewBag.listNews != null)
    {
        foreach (var item in ViewBag.listNews)
        {
            <div style="height: 150px;border-bottom: 1px solid #D8D8D8;margin-top: 10px;" >
              <div id="imagenew"><img src="@item.image" alt="Image" height="120px" width="150px" style="border-radius: 5px;" /></div>
              
                <div>
                     <p style="font-size: 23px;padding-top: 5px;color: goldenrod;">@item.title </p>
                    <div> @item.header <br /> Date create : @item.pubDate</div>
                    <div><a href="/News/ReadNew?newID=@item.ID">Read More</a> </div>
                </div>
            </div>
                                     
        }
    }
    else
    {
        <h2>New is empty</h2>
    }
</div>